package com.ruoyi.puyu.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.puyu.mapper.PuyuMatchImageMapper;
import com.ruoyi.puyu.domain.PuyuMatchImage;
import com.ruoyi.puyu.service.IPuyuMatchImageService;

/**
 * 赛程图片Service业务层处理
 * 
 * @author wusongwen
 * @date 2024-12-25
 */
@Service
public class PuyuMatchImageServiceImpl implements IPuyuMatchImageService 
{
    @Autowired
    private PuyuMatchImageMapper puyuMatchImageMapper;

    /**
     * 查询赛程图片
     * 
     * @param imageId 赛程图片主键
     * @return 赛程图片
     */
    @Override
    public PuyuMatchImage selectPuyuMatchImageByImageId(Long imageId)
    {
        return puyuMatchImageMapper.selectPuyuMatchImageByImageId(imageId);
    }

    /**
     * 查询赛程图片列表
     * 
     * @param puyuMatchImage 赛程图片
     * @return 赛程图片
     */
    @Override
    public List<PuyuMatchImage> selectPuyuMatchImageList(PuyuMatchImage puyuMatchImage)
    {
        return puyuMatchImageMapper.selectPuyuMatchImageList(puyuMatchImage);
    }

    /**
     * 新增赛程图片
     * 
     * @param puyuMatchImage 赛程图片
     * @return 结果
     */
    @Override
    public int insertPuyuMatchImage(PuyuMatchImage puyuMatchImage)
    {
        puyuMatchImage.setCreateTime(DateUtils.getNowDate());
        return puyuMatchImageMapper.insertPuyuMatchImage(puyuMatchImage);
    }

    /**
     * 修改赛程图片
     * 
     * @param puyuMatchImage 赛程图片
     * @return 结果
     */
    @Override
    public int updatePuyuMatchImage(PuyuMatchImage puyuMatchImage)
    {
        puyuMatchImage.setUpdateTime(DateUtils.getNowDate());
        return puyuMatchImageMapper.updatePuyuMatchImage(puyuMatchImage);
    }

    /**
     * 批量删除赛程图片
     * 
     * @param imageIds 需要删除的赛程图片主键
     * @return 结果
     */
    @Override
    public int deletePuyuMatchImageByImageIds(Long[] imageIds)
    {
        return puyuMatchImageMapper.deletePuyuMatchImageByImageIds(imageIds);
    }

    /**
     * 删除赛程图片信息
     * 
     * @param imageId 赛程图片主键
     * @return 结果
     */
    @Override
    public int deletePuyuMatchImageByImageId(Long imageId)
    {
        return puyuMatchImageMapper.deletePuyuMatchImageByImageId(imageId);
    }
}
